<h1>Artikeln in der Lager</h1>
<div class="editFormContainer" id="editStockArticle">
    <?php
    $length1 = 5;
    $length2 = 10;
    $length3 = 15;
    $length4 = 20;
    ?>

    <table class="stockArticleList">
        <tbody>
        <tr>
            <td width="<?php echo $length1; ?>%" valign="top">
                <div>#</div>
            </td>
            <td width="<?php echo $length3; ?>%" valign="top">
                <div><strong>EAN</strong></div>
            </td>
            <td width="<?php echo $length3; ?>%" valign="top">
                <div><strong>NAME(DE)</strong></div>
            </td>
            <td width="<?php echo $length3; ?>%" valign="top">
                <div><strong>Name(CN)</strong></div>
            </td>

            <td width="<?php echo $length2; ?>%" valign="top">
                <div><strong>Preis(Euro)</strong></div>
            </td>
            <td width="<?php echo $length1; ?>%" valign="top">
                <div><strong>Anzahl</strong></div>
            </td>
            <td width="<?php echo $length2; ?>%" valign="top">
                <div><strong>Gesamtpreis(Euro)</strong></div>
            </td>
        </tr>
        <?php
        $cnt = 1;
        $list = $this->getTplVar('stockArticleList');
        if (is_array($list) && count($list) > 0){
            foreach ($list AS $item){

                $name_cn = '---';
                $name_de = '---';
                if (!empty($item['name_cn'])){
                    $name_cn = $item['name_cn'];
                }
                if (!empty($item['name_de'])){
                    $name_cn = $item['name_de'];
                }
                echo '<tr>';

                //check box <label for="'.$article['id'].'" class="selectBoxLabel">'.$article['name_de'].'</label></b>
                echo '<td width="'.$length1.'%" valign="top"><div class="column"></div>'.$cnt.'</td>';
                echo '<td width="'.$length3.'%" valign="top"><div class="column">'.$item['ean'].'</div></td>';
                echo '<td width="'.$length3.'%" valign="top"><div class="column">'.$item['name_de'].'</div></td>';
                echo '<td width="'.$length3.'%" valign="top"><div class="column">'.$item['name_cn'].'</div></td>';

                echo '<td width="'.$length2.'%" valign="top"><div class="column">'.$item['price_e'].'</div></td>';
                echo '<td width="'.$length1.'%" valign="top"><div class="column">'.$item['count'].'</div></td>';
                echo '<td width="'.$length2.'%" valign="top"><div class="column">'.$item['total_price_e'].'</div></td>';
                echo '</tr>';
                $cnt++;
            }
        }

        ?>
        </tbody>
    </table>
    <br />
    <br />
    <br />
    <form action="./index.php?fnc=stock&stockId=<?php echo $this->getTplVar('stockId'); ?>" method="post">
        <label></label><input name="action" value="Export" type="submit" />
    </form>

</div>